/*
 * @Author: huangwei
 * @Date: 2021-06-15 17:25:24
 * @LastEditors: 黄威
 * @LastEditTime: 2022-02-15 17:14:53
 * @Description: file content
 */
import { Component, Vue } from 'vue-property-decorator'
import tip from '@/utils/bind-map/tip'

@Component
export default class DrawMixin extends Vue {
    private tip__!: {
        showTip(message: string): void
        hideTip(): void
    }

    // 初始化tip
    _initTip(continer: HTMLElement, className?: string) {
        this.tip__ = tip(continer, className)
    }

    /**
     * @public
     * 展示随鼠标移动的tip信息
     * @param {String} message 信息
     */
    showTip(message: string) {
        this.tip__.showTip(message)
    }

    /**
     * @public
     * 隐藏tip
     */
    hideTip() {
        this.tip__.hideTip()
    }
}
